/*
 * Amazon Ads API - Sponsored Products
 * Use the Amazon Ads API for Sponsored Products for campaign, ad group, keyword, negative keyword, and product ad management operations. For more information about Sponsored Products, see the [Sponsored Products Support Center](https://advertising.amazon.com/help?entityId=ENTITY3CWETCZD9HEG2#GWGFKPEWVWG2CLUJ). For onboarding information, see the [account setup](setting-up/account-setup) topic.<br/><br/> 
 *
 * The version of the OpenAPI document: 2.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.Bidding;
import org.openapitools.client.model.State;
import org.openapitools.jackson.nullable.JsonNullable;

/**
 * UpdateCampaign
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-04-12T19:05:39.971406+08:00[Asia/Shanghai]")
public class UpdateCampaign {
  public static final String SERIALIZED_NAME_CAMPAIGN_ID = "campaignId";
  @SerializedName(SERIALIZED_NAME_CAMPAIGN_ID)
  private BigDecimal campaignId;

  public static final String SERIALIZED_NAME_PORTFOLIO_ID = "portfolioId";
  @SerializedName(SERIALIZED_NAME_PORTFOLIO_ID)
  private BigDecimal portfolioId;

  public static final String SERIALIZED_NAME_NAME = "name";
  @SerializedName(SERIALIZED_NAME_NAME)
  private String name;

  public static final String SERIALIZED_NAME_TAGS = "tags";
  @SerializedName(SERIALIZED_NAME_TAGS)
  private Map<String, String> tags = null;

  public static final String SERIALIZED_NAME_STATE = "state";
  @SerializedName(SERIALIZED_NAME_STATE)
  private State state;

  public static final String SERIALIZED_NAME_DAILY_BUDGET = "dailyBudget";
  @SerializedName(SERIALIZED_NAME_DAILY_BUDGET)
  private Float dailyBudget;

  public static final String SERIALIZED_NAME_START_DATE = "startDate";
  @SerializedName(SERIALIZED_NAME_START_DATE)
  private String startDate;

  public static final String SERIALIZED_NAME_END_DATE = "endDate";
  @SerializedName(SERIALIZED_NAME_END_DATE)
  private String endDate;

  public static final String SERIALIZED_NAME_PREMIUM_BID_ADJUSTMENT = "premiumBidAdjustment";
  @SerializedName(SERIALIZED_NAME_PREMIUM_BID_ADJUSTMENT)
  private Boolean premiumBidAdjustment;

  public static final String SERIALIZED_NAME_BIDDING = "bidding";
  @SerializedName(SERIALIZED_NAME_BIDDING)
  private Bidding bidding;


  public UpdateCampaign campaignId(BigDecimal campaignId) {
    
    this.campaignId = campaignId;
    return this;
  }

   /**
   * The identifier of an existing campaign to update.
   * @return campaignId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifier of an existing campaign to update.")

  public BigDecimal getCampaignId() {
    return campaignId;
  }


  public void setCampaignId(BigDecimal campaignId) {
    this.campaignId = campaignId;
  }


  public UpdateCampaign portfolioId(BigDecimal portfolioId) {
    
    this.portfolioId = portfolioId;
    return this;
  }

   /**
   * The identifier of an existing portfolio to which the campaign is associated.
   * @return portfolioId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifier of an existing portfolio to which the campaign is associated.")

  public BigDecimal getPortfolioId() {
    return portfolioId;
  }


  public void setPortfolioId(BigDecimal portfolioId) {
    this.portfolioId = portfolioId;
  }


  public UpdateCampaign name(String name) {
    
    this.name = name;
    return this;
  }

   /**
   * The name of the campaign.
   * @return name
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The name of the campaign.")

  public String getName() {
    return name;
  }


  public void setName(String name) {
    this.name = name;
  }


  public UpdateCampaign tags(Map<String, String> tags) {
    
    this.tags = tags;
    return this;
  }

  public UpdateCampaign putTagsItem(String key, String tagsItem) {
    if (this.tags == null) {
      this.tags = new HashMap<String, String>();
    }
    this.tags.put(key, tagsItem);
    return this;
  }

   /**
   * A list of advertiser-specified custom identifiers for the campaign. Each customer identifier is a key-value pair. You can specify a maximum of 50 identifiers.
   * @return tags
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "{\"PONumber\":\"examplePONumber\",\"accountManager\":\"exampleAccountManager\"}", value = "A list of advertiser-specified custom identifiers for the campaign. Each customer identifier is a key-value pair. You can specify a maximum of 50 identifiers.")

  public Map<String, String> getTags() {
    return tags;
  }


  public void setTags(Map<String, String> tags) {
    this.tags = tags;
  }


  public UpdateCampaign state(State state) {
    
    this.state = state;
    return this;
  }

   /**
   * Get state
   * @return state
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public State getState() {
    return state;
  }


  public void setState(State state) {
    this.state = state;
  }


  public UpdateCampaign dailyBudget(Float dailyBudget) {
    
    this.dailyBudget = dailyBudget;
    return this;
  }

   /**
   * The daily budget of the campaign.
   * minimum: 1.0
   * @return dailyBudget
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The daily budget of the campaign.")

  public Float getDailyBudget() {
    return dailyBudget;
  }


  public void setDailyBudget(Float dailyBudget) {
    this.dailyBudget = dailyBudget;
  }


  public UpdateCampaign startDate(String startDate) {
    
    this.startDate = startDate;
    return this;
  }

   /**
   * The starting date of the campaign. The format of the date is YYYYMMDD.
   * @return startDate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The starting date of the campaign. The format of the date is YYYYMMDD.")

  public String getStartDate() {
    return startDate;
  }


  public void setStartDate(String startDate) {
    this.startDate = startDate;
  }


  public UpdateCampaign endDate(String endDate) {
    
    this.endDate = endDate;
    return this;
  }

   /**
   * The ending date of the campaign to stop running. The format of the date is YYYYMMDD.
   * @return endDate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The ending date of the campaign to stop running. The format of the date is YYYYMMDD.")

  public String getEndDate() {
    return endDate;
  }


  public void setEndDate(String endDate) {
    this.endDate = endDate;
  }


  public UpdateCampaign premiumBidAdjustment(Boolean premiumBidAdjustment) {
    
    this.premiumBidAdjustment = premiumBidAdjustment;
    return this;
  }

   /**
   * If set to true, Amazon increases the default bid for ads that are eligible to appear in this placement. See developer notes for more information.
   * @return premiumBidAdjustment
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "If set to true, Amazon increases the default bid for ads that are eligible to appear in this placement. See developer notes for more information.")

  public Boolean getPremiumBidAdjustment() {
    return premiumBidAdjustment;
  }


  public void setPremiumBidAdjustment(Boolean premiumBidAdjustment) {
    this.premiumBidAdjustment = premiumBidAdjustment;
  }


  public UpdateCampaign bidding(Bidding bidding) {
    
    this.bidding = bidding;
    return this;
  }

   /**
   * Get bidding
   * @return bidding
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public Bidding getBidding() {
    return bidding;
  }


  public void setBidding(Bidding bidding) {
    this.bidding = bidding;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UpdateCampaign updateCampaign = (UpdateCampaign) o;
    return Objects.equals(this.campaignId, updateCampaign.campaignId) &&
        Objects.equals(this.portfolioId, updateCampaign.portfolioId) &&
        Objects.equals(this.name, updateCampaign.name) &&
        Objects.equals(this.tags, updateCampaign.tags) &&
        Objects.equals(this.state, updateCampaign.state) &&
        Objects.equals(this.dailyBudget, updateCampaign.dailyBudget) &&
        Objects.equals(this.startDate, updateCampaign.startDate) &&
        Objects.equals(this.endDate, updateCampaign.endDate) &&
        Objects.equals(this.premiumBidAdjustment, updateCampaign.premiumBidAdjustment) &&
        Objects.equals(this.bidding, updateCampaign.bidding);
  }

  private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
    return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
  }

  @Override
  public int hashCode() {
    return Objects.hash(campaignId, portfolioId, name, tags, state, dailyBudget, startDate, endDate, premiumBidAdjustment, bidding);
  }

  private static <T> int hashCodeNullable(JsonNullable<T> a) {
    if (a == null) {
      return 1;
    }
    return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class UpdateCampaign {\n");
    sb.append("    campaignId: ").append(toIndentedString(campaignId)).append("\n");
    sb.append("    portfolioId: ").append(toIndentedString(portfolioId)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    tags: ").append(toIndentedString(tags)).append("\n");
    sb.append("    state: ").append(toIndentedString(state)).append("\n");
    sb.append("    dailyBudget: ").append(toIndentedString(dailyBudget)).append("\n");
    sb.append("    startDate: ").append(toIndentedString(startDate)).append("\n");
    sb.append("    endDate: ").append(toIndentedString(endDate)).append("\n");
    sb.append("    premiumBidAdjustment: ").append(toIndentedString(premiumBidAdjustment)).append("\n");
    sb.append("    bidding: ").append(toIndentedString(bidding)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

